home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 2 / The Arsenal Files 2 (Arsenal Computer).ISO / wildcat / cdmove.wcc < prev    next >
Text File  |  1994-08-15  |  1KB  |  46 lines

  1. rem moves files that are in the database from a given cd rom drive
  2. rem to the file area directory on disk
  3.  
  4. rem brad shipp, brad.shipp@chowda.com, 1:323/120@fidonet.org
  5.  
  6. rem variable declarations
  7.  
  8.     dim filerec as FileRecord
  9.     dim arearec as FileAreaRecord
  10.     dim filepath as string*79
  11.     dim commandLine as string*79
  12.  
  13. rem Drive letter of cdrom drive
  14.     const CDROMDrive = "Y"
  15.  
  16. rem set pointer to beginning of file database and get first one
  17.     getFileInfo(fileRec,"")
  18.  
  19. do
  20.   if left(fileRec.storedPath,1)=CDROMDrive then
  21.     rem fetch full path to file
  22.         filepath=filerec.storedpath+filerec.name
  23.  
  24.     rem get file area storage path
  25.         getFileArea(arearec,filerec.area)
  26.  
  27.     rem make commandline for copy
  28.         commandLine="COPY "+filepath+" "+left(trim(arearec.path),len(trim(arearec.path))-1)
  29.         print commandLine
  30.  
  31.     rem do it
  32.         shell commandLine
  33.  
  34.     rem clear cd rom flag
  35.         filerec.flags=filerec.flags-16
  36.         filerec.storedpath=""
  37.         updateFile(filerec)
  38.  
  39.   end if
  40.  
  41.   rem keep going until we get to the end of the file
  42.   rem or until operator presses a key
  43.  
  44. loop while getNextFile(filerec) and inkey()<>" "
  45.  
  46.